package com.example.image.picasso

import android.graphics.Color
import android.graphics.drawable.ColorDrawable
import android.widget.ImageView
import com.squareup.picasso.Picasso
import jp.wasabeef.picasso.transformations.CropCircleTransformation

object PicassoImgLoader {
    fun loadUrlImg(url:String,iv:ImageView){
        Picasso.get().load(url)
            .placeholder(ColorDrawable(Color.GRAY))
            .error(ColorDrawable(Color.YELLOW))
            .centerCrop()
            .transform(CropCircleTransformation())
            .into(iv)
    }
}